class PrintLettersRunnable implements Runnable {
    @Override
    public void run() {
        for (char c = 'A'; c <= 'J'; c++) {
            System.out.println(Thread.currentThread().getName() + ": " + c);
        }
    }
}

public class ThreadExample2 {
    public static void main(String[] args) {
        PrintLettersRunnable runnable = new PrintLettersRunnable();
        Thread thread = new Thread(runnable);
        thread.start();
    }
}